package top.goldenyear.porpoise.infra.storage.config;

import com.jfinal.kit.Kv;

/**
 * @author airhead
 */
public class FileConfig extends Kv {
  public static FileConfig of(Kv config) {
    FileConfig fileConfig = new FileConfig();
    fileConfig.set(config);
    return fileConfig;
  }

  public static FileConfig of(String storageType, Kv config) {
    FileConfig fileConfig = new FileConfig();
    fileConfig.set(config);
    fileConfig.setStorageType(storageType);
    return fileConfig;
  }

  public String getStorageType() {
    return getStr("storageType");
  }

  public void setStorageType(String storageType) {
    set("storageType", storageType);
  }

  public String getBucket() {
    return getStr("bucket");
  }

  public void setBucket(String bucket) {
    set("bucket", bucket);
  }

  public String getEndpoint() {
    return getStr("endpoint");
  }

  public void setEndpoint(String endpoint) {
    set("endpoint", endpoint);
  }

  public String getRegionId() {
    return getStr("regionId");
  }

  public void setRegionId(String regionId) {
    set("regionId", regionId);
  }


  public String getAccessKey() {
    return getStr("accessKey");
  }

  public void setAccessKey(String accessKey) {
    set("accessKey", accessKey);
  }


  public String getSecretKey() {
    return getStr("secretKey");
  }

  public void setSecretKey(String secretKey) {
    set("secretKey", secretKey);
  }

  public String getDomain() {
    return getStr("domain");
  }

  public void setDomain(String domain) {
    set("domain", domain);
  }


  public String getJdbcUrl() {
    return getStr("jdbcUrl");
  }

  public void setJdbcUrl(String jdbcUrl) {
    set("jdbcUrl", jdbcUrl);
  }


  public String getUsername() {
    return getStr("username");
  }

  public void setUsername(String username) {
    set("username", username);
  }

  public String getPassword() {
    return getStr("password");
  }

  public void setPassword(String password) {
    set("password", password);
  }

}
